home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Graphics / convd / Rexx / convert2tiff.isrx < prev    next >
Text File  |  2000-05-16  |  2KB  |  86 lines

  1. /* ImageStudio ARexx script **************************************/
  2.  
  3. /* Allow commands to return results */
  4.  
  5. options results
  6.  
  7. ADDRESS IMAGESTUDIO
  8.  
  9. /* On error, goto ERROR:. Comment out this line if you wish to */
  10. /* perform your own error checking. */
  11.  
  12. signal on error
  13.  
  14. /* BEGIN PROGRAM *************************************************/
  15.  
  16. /* Warn the user if they are about to overwrite their current project */
  17.  
  18. /* Choose source files */
  19.  
  20.     Sourcedir='ram:t/temp'
  21.     DestDir=  'ram:t/temp.out'
  22.  
  23.     OPEN Sourcedir
  24.     SAVE FILE DestDir FORMAT '"TIFF"' FORCE
  25.  
  26. /* END PROGRAM ***************************************************/
  27.  
  28. exit
  29.  
  30. /* On ERROR */
  31.  
  32. ERROR:
  33.  
  34. /* If we get here, either an error occurred with the command's */
  35. /* execution or there was an error with the command itself. */
  36. /* In the former case, rc2 contains the error message and in */
  37. /* the latter, rc2 contains an error number. SIGL contains */
  38. /* the line number of the command which caused the jump */
  39. /* to ERROR: */
  40.  
  41. if datatype(rc2,'NUMERIC') == 1 then do
  42.     /* See if we can describe the error with a string */
  43.  
  44.     select
  45.         when rc2 == 103 then
  46.             err_string = "ERROR 103, "||,
  47.                 "out of memory at line "||SIGL
  48.         when rc2 == 114 then
  49.             err_string = "ERROR 114, "||,
  50.                 "bad command template at line "||SIGL
  51.         when rc2 == 115 then
  52.             err_string = "ERROR 115, "||,
  53.                 "bad number for /N argument at line "||SIGL
  54.         when rc2 == 116 then
  55.             err_string = "ERROR 116, "||,
  56.                 "required argument missing at line "||SIGL
  57.         when rc2 == 117 then
  58.             err_string = "ERROR 117, "||,
  59.                 "value after keywork missing at line "||SIGL
  60.         when rc2 == 118 then
  61.             err_string = "ERROR 118, "||,
  62.                 "wrong number of arguments at line "||SIGL
  63.         when rc2 == 119 then
  64.             err_string = "ERROR 119, "||,
  65.                 "unmatched quotes at line "||SIGL
  66.         when rc2 == 119 then
  67.             err_string = "ERROR 119, "||,
  68.                 "line too long at line "||SIGL
  69.         when rc2 == 236 then
  70.             err_string = "ERROR 236, "||,
  71.                 "unknown command at line "||SIGL
  72.         otherwise
  73.             err_string = "ERROR "||rc2||", at line "||SIGL
  74.         end
  75.         end
  76. else if rc2 == 'RC2' then do
  77.     err_string = "ERROR in command at line "||SIGL
  78.     end
  79. else do
  80.         err_string = rc2||", line "||SIGL
  81.         end
  82.  
  83. request_message TEXT '"'err_string'"'
  84.  
  85. exit
  86.